#!/bin/sh
export CXX=/usr/bin/g++-7
# Set the libraries
export IPP_ROOT=/home/ypfan/intel/oneapi/ipp/2021.1.1
export IPP_LIB_DIR=${IPP_ROOT}/lib/intel64
export IPP_INC_DIR=${IPP_ROOT}/include
export MKL_ROOT=/home/ypfan/intel/oneapi/mkl/2021.1.1
export MKL_LIB_DIR=${MKL_ROOT}/lib/intel64
export MKL_INC_DIR=${MKL_ROOT}/include
export BUILD_DIR=build
if [ -d ${BUILD_DIR} ]; then
   # shellcheck disable=SC1083
   rm -rf {BUILD_DIR}
fi
mkdir ${BUILD_DIR}
# shellcheck disable=SC2164
cd ${BUILD_DIR}
cmake ../ \
-DCMAKE_C_FLAGS="-g -Wall" \
-DCMAKE_CXX_FLAGS="-g -Wall" \
-DRTSEIS_WRAP_PYTHON=NO \
-DBUILD_SHARED_LIBS=OFF \
-DADD_TEST=OFF \
-DIPP_ROOT=${IPP_ROOT} \
-DMKL_ROOT=${MKL_ROOT}
make